name: ESLint check

on:
  push:
    branches: [ "main", "dev"]
  pull_request: 
    branches: [ "main"]

env:
  CI: true

jobs:
  eslint:
    name: Run eslint scanning
    runs-on: ubuntu-latest
    permissions:
      contents: read
      security-events: write
      actions: read
    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: Install ESLint
        run: |
          npm install eslint
          npm install eslint-config-airbnb-base
          npm install eslint-plugin-import

      - name: Run ESLint
        run: npx eslint .
        continue-on-error: true